<?php
class ArticleEntryFilter
{ 
	private $_fromDate = false;
	private $_toDate = false;
	private $_tags = false;
	private $_categoryId = 0;
	
	public function SetFromDate($date)
	{
		$this->_fromDate = strtotime($date);		
	}
	
	public function SetToDate($date)
	{
		$this->_toDate = strtotime($date);
	}
	
	public function SetTags($tags)
	{
		$this->_tags = $tags;
	}

	public function SetCategory($id)
	{
		$this->_categoryId = $id;
	}	

	public function GetCategory()
	{
		return $this->_categoryId;
	}	
	
	public function GetFromDate($format = 'd.m.Y H:i')
	{
		if ($this->_fromDate === false) return false;
		return date($format, $this->_fromDate);		
	}
	
	public function GetToDate($format = 'd.m.Y H:i')
	{
		if ($this->_toDate === false) return false;
		return date($format, $this->_toDate);
	}
	
	public function GetTags()
	{
		return $this->_tags;
	}	
}